#define _CRT_SECURE_NO_WARNINGS 1
#include"SList2.h"
//void Test()
//{
//	SList* s1 = (SList*)malloc(sizeof(SList));
//	SList* s2 = (SList*)malloc(sizeof(SList));
//	SList* s3 = (SList*)malloc(sizeof(SList));
//	SList* s4 = (SList*)malloc(sizeof(SList));
//	SList* s5 = (SList*)malloc(sizeof(SList));
//	s1->_val = 1;
//	s2->_val = 2;
//	s3->_val = 3; 
//	s4->_val = 4;
//	s5->_val = 5;
//
//	s1->_next = s2;
//	s2->_next = s3;
//	s3->_next = s4;
//	s4->_next = s5;
//	s5->_next = NULL;
//	SLTPrint(s1);
//}
void SLTTest1()
{
	SLTNode* plist = NULL;
	/*SLTPushBack(&plist, 1);
	SLTPushBack(&plist, 2);
	SLTPushBack(&plist, 3);
	SLTPrint(plist);*/
	SLTPushFront(&plist, 6);
	SLTPushFront(&plist, 5);
	SLTPushFront(&plist, 4);
	SLTPrint(plist);
	/*SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);
	SLTPopBack(&plist);
	SLTPrint(plist);*/
	//SLTPopBack(&plist);
	//SLTPrint(plist);
	SLTPopFront(&plist);
	SLTPrint(plist);
	SLTPopFront(&plist);
	SLTPrint(plist);
	SLTPopFront(&plist);
	SLTPrint(plist);
	//SLTPopFront(&plist);
	//SLTPrint(plist);

}
void SLTTest2()
{

	SLTNode* plist = NULL;
	SLTPushFront(&plist, 6);
	SLTPushFront(&plist, 5);
	SLTPushFront(&plist, 4);
	SLTPrint(plist);
	SLTNode* ret = SLTFind(plist, 4);
	if (ret != NULL)
	{
		//ret->_data = 90;
		//SLTInsert(&plist, 800, ret);
		//SLTErase(&plist, ret);
		//SLTInsertAfter(plist, 88, ret);
		SLTEraseAfter(&plist, ret);
		SLTPrint(plist);
	}
}
int main()
{
	SLTTest2();
	return 0;
}